var  axios = require('./http')
function getopenid(code){
  axios._post('getOpenid',{code:code}).then(res=>{
    console.log('获取到用户的【openid】=', res.data.openid);
    wx.setStorageSync('openid', res.data.openid);
  })
}


const login =ctx=>{  return axios._post('login',ctx)}



module.exports ={
  getopenid:getopenid,
  login:login
} 